#ifndef PARAMETERS_H
#define PARAMETERS_H
#include<string>
#include<vector>
#include"opencv2/opencv.hpp"
#include"common.h"
using std::string;

struct Mxnet_Model_Params
{
	string model_path;
	int epoch = 0;
	int width;
	int height;
	float mean_r = 123.;
	float mean_g = 117.;
	float mean_b = 104.;
	int device_type = 2;
	int device_id = 0;
	float thresh;
};

struct FaceInfo_Model_Params
{
	std::vector<string> models;
	int epoch = 0;
	int width;
	int height;
	float mean_r = 123.;
	float mean_g = 117.;
	float mean_b = 104.;
	int device_type = 2;
	int device_id = 0;
	float thresh;
};

struct OpenPose_Params
{
	string model_path;
	string deploy_path;
	int width = 200;
	int height = 200;
};

struct FaceID_Model_Params
{
	bool enable = true;
	string model_path;
	string deploy_path;
	string feature_mean;
	float thresh = 0.4;
};

struct MTCNN_Params
{
	int width = 200;
	int height = 200;

	string p_net;
	string r_net;
	string o_net;
};

struct Render_Params
{
	string background_image;
	string person_image;
	bool draw_rect = false;
	int render_mode = 0;//0-vertical,1-horizontal
};

struct Database_Params
{
	string database_folder;
	string databse_record;
};

struct Tracker_Params
{
	int dist_type = 0;		//DistCenters = 0, DistRects = 1, DistJaccard = 2
	int kalman_type = 1;	//KalmanLinear = 0, KalmanUnscented = 1
	int filter_goal = 1;	//FilterCenter = 0, FilterRect = 1
	int lost_track_type = 1;//TrackNone = 0, TrackKCF = 1
	int match_type = 1;		//MatchHungrian = 0, MatchBipart = 1
	float delta_time = 0.2f; // Delta time for Kalman filter
	float noise_magnitude = 0.1f; // Accel noise magnitude for Kalman filter

	float distance_threshold;
	int max_skipped_frames = 25; // Maximum allowed skipped frames
	int max_track_length = 10; // Maximum trace length
};

class Parameters
{
public:

	//video params
	Video_Params video_params;

	//net params
	int detector_mode = 0;
	OpenPose_Params human_detector_params;

	Mxnet_Model_Params person_detector_params;

	MTCNN_Params mtcnn_params;

	FaceInfo_Model_Params face_info_params;

	FaceID_Model_Params face_ID_params;

	//door params
	Door_Params door_params;

	//render_params
	Render_Params render_params;

	//database params
	Database_Params database_params;

	//track params
	Tracker_Params track_params;

	TotalInfo statistic_params;
	//face save
	std::string save_face_path;
	bool issave = false;
};


#endif // !PARAMETERS_H
